package common.mapstruct;

import org.mapstruct.Mapper;
import org.mapstruct.Mapping;
import org.mapstruct.factory.Mappers;

@Mapper
public  interface MapperConvertService {

    MapperConvertService CONVERT_SERVICE = Mappers.getMapper(MapperConvertService.class);

    MapstuctDemo.Student toStudent(MapstuctDemo.Person person);

    @Mapping(source = "family.personList", target = "studentList")
    MapstuctDemo.School toSchool(MapstuctDemo.Family family);

}